﻿namespace Fetches.Fetch.Dto
{
    /// <summary>
    /// 对某个Fetch结果的消费
    /// </summary>
    public class ProcessOrder
    {
        /// <summary>
        /// Processor的全称
        /// </summary>
        public string ProcessorType { get; set; }
        /// <summary>
        /// 这个设置用于初始化对应Processor
        /// </summary>
        public string ProcessorConfig { get; set; }
        /// <summary>
        /// 指定要消费的爬取
        /// </summary>
        public long FetchReceiptId { get; set; }
        /// <summary>
        /// 多线程处理
        /// </summary>
        public int ProcessorCount { get; set; }

        public static ProcessOrder ProcessWith(FetchReceipt fetchReceipt)
        {
            var order=new ProcessOrder
            {
                FetchReceiptId=fetchReceipt.Id
            };
            return order;
        }
    }
}
